import PropTypes from 'prop-types';

class MyComponent extends React.Component{
	render(){
		const children = this.props.children;
		return (
			<div>
				{children}
			</div>
		);
	}
}

MyComponent.propTypes = {
	children:PropTypes.element.isRequird
}

class Greeting extends React.Component{
	render(){
		return (
			<h1>Hello, {this.props.name}</h1>
		);
	}
}

Greeting.defaultProps = {
	name: 'Stranger'
};

ReactDOM.render(<Greeting/>, document.getElementById('root'));